﻿<UserControl x:Class="BadHabit.Factory.Controls.TaskToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                 
    xmlns:BadHabit_Factory_Controls="clr-namespace:BadHabit.Factory.Controls"
    xmlns:BadHabit_WPFTools="clr-namespace:BadHabit.WPFTools;assembly=BadHabit.WPFTools"      
    xmlns:BadHabit_Factory="clr-namespace:BadHabit.Factory"
             
    xmlns:props="clr-namespace:BadHabit.Factory.Windows.Properties"
             
             
             
    DataContextChanged="UserControl_DataContextChanged">

    

    <!-- TOOL BAR -->
    
        
        <ToolBar ToolBarTray.IsLocked="True" Height="60">


        <BadHabit_Factory_Controls:CurrentSprintDisplay Margin="0,0,5,0" />

        <Separator />

        <TextBlock VerticalAlignment="Center" Style="{StaticResource Label}" Text="{x:Static props:Resources.Search}" />
        <TextBox x:Name="searchTextBox" Width="150" Style="{StaticResource FilterTextBox}"  SelectionChanged="searchTextBox_SelectionChanged" />

        <TextBlock x:Name="atTextBlock" Style="{StaticResource Label}" VerticalAlignment="Center" Text="{x:Static props:Resources.at}"/>

        <BadHabit_WPFTools:ComboBox
            x:Name="taskFilterComboBox"
            Style="{StaticResource FormComboBox}"/>


        <Menu>

            <MenuItem   
                    Command="BadHabit_Factory:FactoryCommands.AddTask"
                    Header="{x:Static props:Resources.Add_Task}"      
                    x:Name="AddTaskMenu"
                    Style="{StaticResource ToolBarMenuItem}">
                <MenuItem.Icon>
                    <Image Source="/Images/TaskType/32x32/PROJECT_TASK.png" Stretch="Uniform" Width="32" Height="32"/>
                </MenuItem.Icon>
                <MenuItem.Items>
                    <StaticResource ResourceKey="AddProjectTaskMenuItem" />
                    <StaticResource ResourceKey="AddTestTaskMenuItem"/>
                    <StaticResource ResourceKey="AddBugMenuItem"/>
                    <StaticResource ResourceKey="AddAfterDeployBugMenuItem"/>
                    <Separator/>
                    <StaticResource ResourceKey="AddImpedimentMenuItem"/>
                </MenuItem.Items>
            </MenuItem>

            <MenuItem
                x:Name="bugButton"
                Header="{x:Static props:Resources.Bugs}"
                Style="{StaticResource ToolBarMenuItem}"
                Click="bugButton_Click" IsCheckable="True">
                <MenuItem.Icon>
                    <Image Source="/Images/TaskType/32x32/Developing_Bug.png" Stretch="Uniform" Width="32" Height="32"/>
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem
                Header="{x:Static props:Resources.Impediments}"
                Style="{StaticResource ToolBarMenuItem}"
                x:Name="impedimentButton"                                
                Click="impedimentButton_Click"
                IsCheckable="True">
                <MenuItem.Icon>
                    <Image Source="/Images/TaskType/32x32/Impediment.png" Stretch="Uniform" Width="32" Height="32"/>
                </MenuItem.Icon>
            </MenuItem>

        </Menu>


        <Separator />

        <Menu>

            <MenuItem 
                x:Name="postItViewButton"
                Header="{x:Static props:Resources.Post_It_View}" Style="{StaticResource ToolBarMenuItem}" >
                <MenuItem.Icon>
                    <Image Source="/Images/ToolBar/PostitView.png" Stretch="Uniform" Width="32" Height="32"/>
                </MenuItem.Icon>
            </MenuItem>
            
            <MenuItem 
                x:Name="tableViewButton"
                Header="{x:Static props:Resources.List_View}" Style="{StaticResource ToolBarMenuItem}" >
                <MenuItem.Icon>
                    <Image Source="/Images/ToolBar/ListView.png" Stretch="Uniform" Width="32" Height="32"/>
                </MenuItem.Icon>
            </MenuItem>

            <MenuItem Header="{x:Static props:Resources.Allocation}" Style="{StaticResource ToolBarMenuItem}" Click="teamAllocationButton_Click">
                <MenuItem.Icon>
                    <Image Source="/Images/ToolBar/TeamMember.png" Stretch="Uniform" Width="32" Height="32"/>
                </MenuItem.Icon>
            </MenuItem>
            

        </Menu>

        <Separator x:Name="timeSeparator" />

        <BadHabit_Factory_Controls:Timer
            x:Name="timer"
                    HorizontalAlignment="Right"
                    Width="80" Height="40"  />


    </ToolBar>
    
</UserControl>
